package oa.service.impl;

import java.util.List;

import oa.dao.CompanyDao;
import oa.dao.impl.CompanyDaoImpl;
import oa.entity.Company;
import oa.exception.DaoException;
import oa.service.CompanyService;

public class CompanyServiceImpl implements CompanyService {

	CompanyDao companyDao = new CompanyDaoImpl();
	@Override
	public boolean addCompany(Company company) throws DaoException {
		return companyDao.addCompany(company);
	}
	
	@Override
	public List<Company> selectAllCompany(int companyid) throws DaoException {
		return companyDao.selectAllCompany(companyid);
	}
	
	@Override
	public List<Company> selectCompany(int companyId) throws DaoException {
		return companyDao.selectCompany(companyId);
	}

	@Override
	public boolean updateCompany(Company company) throws DaoException {
		return companyDao.updateCompany(company);
	}

	@Override
	public boolean deleteCompany(int companyId) throws DaoException {
		return companyDao.deleteCompany(companyId);
	}

}
